
@inherits BaseComponent

@namespace FluentCMS.Web.Plugins.Admin.FileManagement

@if (Visible)
{
    <EditForm Model="@Model" OnSubmit="HandleSubmit">
        <Modal Size="ModalSize.Large" OnClose="HandleCancel">
            <ModalHeader Closable>
                <ModalTitle>
                    Upload File
                </ModalTitle>
            </ModalHeader>
            <ModalBody>
                <Grid>
                    <FormFileUpload Dense OnChange="OnFilesChanged" Accept="@Config.AllowedExtensions" Required />
                </Grid>
            </ModalBody>
            <ModalFooter>
                <FormActions>
                    <Button Color="Color.Primary" Type="ButtonType.Submit">
                        Submit
                    </Button>
                    <Button @onclick="HandleCancel">
                        Cancel
                    </Button>
                </FormActions>
            </ModalFooter>
        </Modal>
    </EditForm>
}